home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Technotools
/
Technotools (Chestnut CD-ROM)(1993).ISO
/
misc_pto
/
mvi
/
lvi.doc
< prev
next >
Wrap
Text File
|
1991-12-14
|
11KB
|
404 lines
───────────────────
L V I C O D E S
───────────────────
by Byron
Authorized by John C. Bushnell, the designer of LVI
LVI, Copyright 1991 - J. Bushnell Software
for all to share, without restriction
Prolog
"
LVI stands for 'Last Video Interface'. LVI is a
terminal emulation which was designed to replace ANSI
for over-the-modem application. LVI at its most basic
level is, I guess you could say, compressed ANSI.
However, LVI goes far beyond ANSI with a host of
badly needed features for the over-the-modem enviorn-
ment where you are not automatically privy to being
able to access the video memory directly, needed for:
saving the screen, scrolling smaller portions of the
screen, and other high speed video referencing we
often take for granted.
John Bushnell
(Lcom and LVI author)
"
Structure Comparison, ANSI / LVI
--------------------------------
ANSI: <27>[numeric;numeric;..;numeric<command>
- in the ansi command structure, data is passed in the form of
ascii based numbers, seperated by semi-colons. ex. 176;177;178
...and the frame ends upon the first non-number character, which
is assumed to be the command type.
LVI: <28><command><n><n>..<n>
- in the LVI command structure, data is passed in the form of
BINARY ascii equivalents, no seperation needed. ex. ░▒▓
(equivalent of 176;177; and 178.) Since you can no longer
assume the command ends with the first non-number (meaning,
not '0' - '9',) the command comes BEFORE the data in LVI,
thus making the number of parameters known because each command
always has the same number of parameters.
Well then, you may ask, what about ANSI commands which could
or could not have parameters? Many ANSI commands will allow
you to just 'leave out' the data with the assumption that it
is 1. i.e. <27>[1A = <27>[A. Well:
- In LVI, since you must already know the number of parameters,
it goes through one more piece of translation. If there are
ANY parameters, the command is in lower case. If there are
NOT, the command is in upper case. (this applies only to
commands in the 'A'..'Z' region for obvious reasons, but then
all ANSI commands are). Luckily there are no command
conflicts by doing this, because THIS way, it is still a cake-
walk to convert ANSI format directly to LVI; one of the more
beautiful aspects of LVI.
LVI COLOR: <29> c
- to compress color changing even furthur, LVI uses a seperate
command, #29. The next character to follow a character #29
is the new color in the Standard IBM video format.
c = (background * 16) + foreground
0 = black, 1 = blue, 2 = green, 3 = cyan, 4 = red, 5 = magenta
6 = brown, 7 = grey. (for bright foregrounds, # + 8)
LVI COMPRESSION:
See in Part 3, the '─' (character #196) command for what is
known as LVI COMPRESSION; an intrigal part of LVI operation
which is used to compress sequences of repeating characters.
PART 1. TTY-DERIVED COMMANDS
LVI supports all standard TTY commands, i.e. the bell,
backspace, carraige return, linefeed, etc.
PART 2. ANSI-DERIVED LVI COMMANDS
LVI supports ALL ANSI COMMANDS in their LVI equivalent
format.
PART 3. COMMAND SET UNIQUE TO LVI
Command Structure: <character #28><command><data><data>..<data>
<cmd><data> Description
───────────────────────────────────────────────────────────────────────────────
28+
(#28) Writes "" (full command is: )
(#29) Writes "" (full command is: )
#0<char> (#0) Writes <char>, bypassing TTY , ANSI , and LVI
translation. ex: bell character, backspace character,
carraige return character, line feed character,
escape character, etc. anything.
s<slot> Saves the cursor position into <slot> (number 0 - 7)
u<slot> Restores the cursor position in <slot> (number 0 - 7)
=<length> Colorizes whatever is on the screen for <length>
characters from the cursor to the right, with the
current color, and moves cursor to the end of the
color segment drawn. This does not affect the
characters beneath.
░ (#176) Colorizes the whole window with the current color
and does not move the cursor. This does not affect the
characters beneath.
(note that this command does NOT home the cursor, where
as the fill-character command (below) does.)
█<char> (#219) Fills the window with <char> and current color,
and homes the cursor.
(note that this command homes the cursor, where as the
fill-color command (above) does not.)
─<char><repeat> (#196) Draws <char> <repeat> times, to the right
This command is refered to as LVI COMPRESSION and should
be implemented when ever several( > 4) of the same
characters come in a row to be processed. The biggest
speed increases are achieved when this is implemented
to its fullest.
The maximum number <repeat> can be garunteed is 254.
│<char><repeat> (#179) Draws <char> <repeat> times, downward
The maximum number <repeat> can be garunteed is 254.
■<length><macro> (#254) Defines a <macro> of length <length>
The only LVI commands you cannot use within the macro
are the macroing commands. Not, prudent.
The maximum size the macro can be is 250.
* Stamps the macro, interpreting any commands in it.
|<length><string> Writes <string> of length <length> downward. <string>
isn't interpreted and displayed until all characters
have arrived. (The "=" <colorize-right-of-curs command>
will colorize downwards if embedded in this command.)
In effect, at any time in the display of the <string>
the cursor would normally move to the right, it now
moves down. This command exists mainly for speeding up
scroll left and scroll right operations which need to
fill in new data in a vertical line.
W Resets the current window to be the maximum window size.
w<x1><y1><x2><y2> Sets window coordinates
<x1>, <y1>: the coordinates of the top left corner
<x2>, <y2>: the coordinates of the bottom right
corner
< Scrolls the window to the left once
{<scroll> Scrolls the window to the left <scroll> times
> Scrolls the window to the right once
}<scroll> Scrolls the window to the right <scroll> times
(#30) Scrolls the window upward once
<scroll> (#24) Scrolls the window upward <scroll> times
(#31) Scrolls the window downward once
<scroll> (#25) Scrolls the window downward <scroll> times
∞<slot> (#236) Saves the window contents into <slot>
number 0 - 2.
φ<slot> (#237) Restores the window contents from <slot>
number 0 - 2, and clears that slot.
ε<slot> (#238) Restores the window contents from <slot>
number 0 - 2, without clearing that slot.
V Returns Video Configuration in the format:
#28v<scrcols><scrlins><wincols><winlins><flags>
.. and <num><extended><extended> if available.
notice the return command 'v' is lower case.
<scrcols>: number of columns in the screen
<scrlins>: number of lines in the screen
<wincols>: number of columns in the current window
<winlins>: number of lines in the current window
<flags>: bit 0 - color? (0 / 1) 0 = no, 1 = yes
bit 1 - no = 8 backgrounds, and blinking
yes = 16 backgrounds, no blinking
.
. <reserved>
.
bit 7 - more data available? (0 / 1)
<extended>: to be able to expand in the future,
if bit 7 of the flags variable is
on, then extended data is present. It
is started with the <num>ber of extra
pieces of data, and then that data.
(contents to be defined later)
. . . . . . . . . . . . . . . .
Questions can be refered to John Bushnell on an elec. BBS at (714) 492-3804.
through 1993 only please; be nice to your phone company. :)
[end] lvi.doc - 12/91, compiled by 'Byron'